﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Share/Index.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script src="../../Scripts/common/jquery.leanModal.min.js" type="text/javascript"></script>
        <style type="text/css">
        #lean_overlay { position: fixed; z-index: 100; top: 0px; left: 0px; height: 100%; width: 100%; background: #000; display: none; }
        #OpenWindow { font-size:12px; background: none repeat scroll 0 0 #FFFFFF; border-radius: 5px 5px 5px 5px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.7); display: none; padding-bottom: 2px; width: 700px; z-index: 11000; left: 50%; margin-left: -202px; opacity: 1; position: fixed; top: 200px;}
        #OpenWindow-header { background: url("../../img/hd-bg.png") repeat scroll 0 0 transparent; border-bottom: 1px solid #eeeeee; border-top-left-radius: 5px; border-top-right-radius: 5px; padding: 10px; }
        #OpenWindow-header h2{margin-left:10px;}
        .modal_close { background: url("../../img/modal_close.png") repeat scroll 0 0 transparent; display: block; height: 14px; position: absolute; right: 12px; top: 12px; width: 14px; z-index: 2; }
 
        #OpenWindow .txt-fld { border-bottom: 1px solid #EEEEEE; padding: 8px 6px; position: relative; text-align: left; width: 644px;cursor:pointer;}
        #OpenWindow .txt-fld label { padding-left: 15px;color:Black;}
        </style>
<script type="text/javascript" language="JavaScript">
    $(document).ready(function () {
        $(".txt-fld").mousemove(function (o) {
            $(this).css("background-color", "#cccccc");
        });
        $(".txt-fld").mouseout(function (o) {
            $(this).css("background-color", "#ffffff");
        });
    });
    var userinfo = { u_id: 0, u_nick: "", u_from: 1, u_registTime: new Date, u_number: "", u_name: "", u_enName: "", u_jwclass: "", u_papers: "", u_birthday: new Date, u_age: 0, u_sex: 0, u_school: "", u_class: "", u_english: "", u_patriarchName1: "", u_raletion1: "", u_tel1: "", u_patriarchAge1: 0, u_patriarchEducation1: "", u_job1: "", u_post1: "", u_patriarchName2: "", u_raletion2: "", u_tel2: "", u_patriarchAge2: 0, u_patriarchEducation2: "", u_job2: "", u_post2: "", u_address: "", u_email: "", u_state: 0, u_time: null, u_teacher1: "", u_teacher2: "", u_studyTime1: "", u_studyTime2: "",u_vip:0};
    var mylist,jwclass=[],ustate=[],uvip=[],cardType=[];
    var regular_input = {
        u_nick: { exp: /^[a-zA-Z][a-zA-Z0-9]{4,20}$/, m: "字母数字组成,字母开头，4-20字符以内" },
        u_name: { exp: /^.{1,10}$/, m: "请输入中文名，10字符以内" },
        u_patriarchAge1: { exp: /^\d{0,3}$/, m: "年龄格式不正确" },
        u_patriarchAge2: { exp: /^\d{0,3}$/, m: "年龄格式不正确" },
        u_tel1: { exp: /^\d{1,}$/, m: "家长电话1格式不正确" },
        u_tel2: { exp: /^\d{1,}$/, m: "家长电话2格式不正确" },
        u_address: { exp: /^.{1,100}$/, m: "住址100个字符以内" },
        u_jwclass: { exp: /^[0-9]\d*$/, m: "请选择嘉沃班级" },
        u_vip: { exp: /^[0-9]\d*$/,m:"请选择会员状态" }
    }
    var mainForm = "";
    $(document).ready(function () {
        $("#resetPwd").click(function () {
            if (confirm("确定要重置密码？")) {
                $.post("/userinfo/updatepass.html?" + (new Date()).getTime(), { res: $(this).attr("uid") }, function (dta) {
                    alert("密码已重置");
                });
            }
        });


        $("#btnreset").click(function () {
            $("#mainForm input").each(function () {
                if ($(this).attr("id") != "buttsend" && $(this).attr("id") != "btnreset" && $(this).attr("id") != "u_time" && $(this).attr("id") != "u_birthday") {
                    $(this).val("");
                }
            });
        });
        mylist = new TurnPage("mylist");
        mylist.pageSize = 8;
        mylist.callback = function () { ajax(); };

        function ajax() {
            var param = { pagesize: mylist.pageSize, pageno: mylist.currPage, ucard: $.trim($("#seekForm :input[name=ucard]").val()), uname: $.trim($("#seekForm :input[name=uname]").val()), unick: $.trim($("#seekForm :input[name=unick]").val()), unumber: $.trim($("#seekForm :input[name=unumber]").val()), ujwclass: $.trim($("#seekForm :input[name=ujwclass]").val()), ustate: $.trim($("#seekForm :input[name=ustate]").val()), uvip: $.trim($("#seekForm :input[name=uvip]").val()), uteacher1: $.trim($("#seekForm :input[name=uteacher1]").val()), uregistTime_s: $.trim($("#seekForm :input[name=uregistTime_s]").val()), uregistTime_e: $.trim($("#seekForm :input[name=uregistTime_e]").val()), orderName: $("#seekForm :input[name=orderName]").attr("checked"), orderEname: $("#seekForm :input[name=orderEname]").attr("checked"), orderNumber: $("#seekForm :input[name=orderNumber]").attr("checked"), orderBrithday: $("#seekForm :input[name=orderBrithday]").attr("checked"), orderVip: $("#seekForm :input[name=orderVip]").attr("checked"), orderJwclass: $("#seekForm :input[name=orderJwclass]").attr("checked"), orderId: $("#seekForm :input[name=orderId]").attr("checked") };
            $.post("/userinfo/getUserinfoList.html?" + (new Date()).getTime(), param, function (data) {
                data = $.evalJSON(data);
                if (mylist.currPage == 1) {
                    mylist.total = $.grep(data, function (n, i) { return typeof (n.total) == "number"; })[0].total;
                    data = $.grep(data, function (n, i) { return typeof (n.total) == "undefined"; });
                }
                loadDta(data);
            });
        }
        ajax();
        var loadDta = function (list) {
            var sp = [];
            var mapid;
            $("#mainTable tbody[name=mainlist]").html("");
            $.each(list, function (i, n) {
                sp.push('<tr>');
                sp.push('<td>' + n.u_name + '</td>');
                sp.push('<td>' + n.u_enName + '</td>');
                sp.push('<td>' + n.u_number + '</td>');
                sp.push('<td>' + (n.u_sex == 0 ? "男" : "女") + '</td>');
                sp.push('<td>' + (new Date(n.u_birthday).Format("yyyy-MM-dd")) + '</td>');
                sp.push('<td>' + uvip["x" + n.u_vip] + '</td>');
                sp.push('<td>' + jwclass["x" + n.u_jwclass] + '</td>');
                sp.push('<td>' + n.u_tel1 + '</td>');
                var userJson = $.toJSON(n);
                sp.push("<td><a href='#mainForm' onclick='edit(" + n.u_id + ")' name='linkEdit' vid='" + n.u_id + "'>修改</a>    <a href='#OpenWindow' rel='leanModal' onclick='javascript:detail(" + userJson + ")' name='linkEdit'>详情</a>   <a href='#' onclick='_czjl(" + n.u_id + ",\"" + n.u_name + "\")' vid='" + n.u_id + "'>充值</a>    <a href='#' onclick='window.showModalDialog(\"/userinfo/cardlist.html?pagetime=" + (new Date()).getTime() + "&uid=" + n.u_id + "\",\"\",\"dialogWidth:1000px;\");'>充值记录</a>    <a href='#' onclick='window.showModalDialog(\"/userinfo/readlist.html?pagetime=" + (new Date()).getTime() + "&uid=" + n.u_id + "\",\"\",\"dialogWidth:1000px;\");'>借阅记录</a></td>");
                sp.push('</tr>');
            });
            $("#mainTable tbody[name=mainlist]").append(sp.join(''));
            //if (sp.length == 0) alert('没有符合条件的数据');
            $("#pager").html(mylist.getOutput());
            $('a[rel*=leanModal]').leanModal({ top: 100, closeButton: ".modal_close" });
        }
        $("input[name=buttSeek]").click(function () {
            mylist.currPage = 1;
            ajax();
        });
        $("#btnUpdateUvip").click(function () {
            if ($("#updateuvip").val() == "-1") {
                alert("会员状态必须选择");
                $(this).focus();
                return false;
            }
            $.post("/userinfo/cuvip.html?" + (new Date()).getTime(), { res: $("#resetPwd").attr("uid"), uvip: $("#updateuvip").val() }, function (dta) {
                alert("会员状态修改成功,为缓解服务器压力，详细内容需从新查询才会更新");
                $("#updateuvip").val("-1");
            });
        });
        $("input[name=buttsend]").click(function () {
            if (!$.checkFormValid("mainForm")) return false;
            $.fillObj(userinfo, "#mainForm");
            $.post("/userinfo/reg.html", { nick: userinfo.u_nick, num: userinfo.u_number, uid: userinfo.u_id }, function (bdta) {
                if (bdta == 0) {
                    if (userinfo.u_patriarchAge1 == "") {
                        userinfo.u_patriarchAge1 = 0;
                    }
                    if (userinfo.u_patriarchAge2 == "") {
                        userinfo.u_patriarchAge2 = 0;
                    }
                    $.post("/userinfo/saveUserInfo.html", { userinfo: $.toJSON(userinfo) }, function (dta) {
                        alert("保存成功");
                        $("#btnreset").click();
                        ajax();
                    });
                }
                else if (bdta == 1) {
                    alert("登录名和学籍编号重复，保存失败");
                }
                else if (bdta == 2) {
                    alert("登录名重复，保存失败");
                }
                else if (bdta == 3) {
                    alert("学籍编号重复，保存失败");
                }

            });
        });
    });
    function edit(id) {
        $.post("/userinfo/getuserinfobyid.html?" + (new Date()).getTime(), { res: id }, function (dta) {
            userinfo = $.evalJSON(dta);
            $.fillForm(userinfo, "#mainForm");
            $("input[name=buttsend]").val('修改');
        });
    }
    function _czjl(id,name) {
        $("input[name=btnSetCard]").attr("domid", "popcont");
        $("input[name=btnSetCard]").attr("uid", id);
        $("input[name=btnSetCard]").attr("uname", name);
        $("input[name=uc_card]").attr("domid", "popcont");
        popLayer.show("", $("#cz").html(), " ", false, "");
    }
    function _cardinfo(cardid,domid) {
        if (cardid != "") {
            $.post("/userinfo/getcardinfo.html?" + (new Date()).getTime(), { card: cardid }, function (dta) {
                var _cardinfo = dta.replace(/^\"*|\"*$/g, "").split(",");
                $("#" + domid + " input[name=uc_kf]").val(_cardinfo[0]);
                $("#" + domid + " input[name=uc_yj]").val(_cardinfo[1]);
                $("#" + domid + " input[name=uc_bz]").val(_cardinfo[2]);
            });
        }
    }
    function _cz(id,domid) {
            var _uccard = $("#" + domid + " input[name=uc_card]");
            var _uc_chargeMode = 0; //$("#" + domid + " select[name=uc_chargeMode]");
            var _uc_kf = $("#" + domid + " input[name=uc_kf]");
            var _uc_yj = $("#" + domid + " input[name=uc_yj]");
            var _uc_bz = $("#" + domid + " input[name=uc_bz]");
            var _btn = $("#" + domid + " input[name=btnSetCard]");
            if (_uccard.val() == "") {
                alert("请输入充值卡号");
                _uccard.focus();
                return false;
            }
//            if (_uc_chargeMode.val() == "-1") {
//                alert("请选择充值卡类型");
//                _uc_chargeMode.focus();
//                return false;
//            }
            if (_uc_kf.val() == "") {
                alert("请填写充值卡卡费");
                _uc_kf.focus();
                return false;
            } else if (!/^(\-|\+)?\d+(\.\d+)?$/.test(_uc_kf.val())) {
                alert("充值卡卡费格式不正确");
                _uc_kf.focus();
                _uc_kf.select();
                return false;
            }
            if (_uc_yj.val() == "") {
                alert("请填写充值卡押金");
                _uc_yj.focus();
                return false;
            } else if (!/^(\-|\+)?\d+(\.\d+)?$/.test(_uc_yj.val())) {
                alert("充值卡押金格式不正确");
                _uc_yj.focus();
                _uc_yj.select();
                return false;
            }
            if (confirm("确定要为" + _btn.attr("uname") + "充值？")) {
                $.post("/userinfo/setcard.html?" + (new Date()).getTime(), { res: id, card: _uccard.val(), cmode: 0, ckf: _uc_kf.val(), cyj: _uc_yj.val(), cbz: _uc_bz.val() }, function (dta) {
                    if (dta == 0) {
                        alert("充值失败请重试");
                    } else if (dta == 1) {
                        alert("充值卡无效");
                    } else {
                        alert("充值成功");
                        _uccard.val("");
                        //_uc_chargeMode.val("-1");
                        _uc_kf.val("");
                        _uc_yj.val("");
                        _uc_bz.val("");
                    }
                });
            }
        }
    function detail(n) {
        $("#sutitle").html("会员<span style='color:red;'>" + n.u_name + "</span>的信息");
        $("#suname").html(n.u_name);
        $("#sunick").html(n.u_nick);
        $("#suvip").html(uvip["x" + n.u_vip]);
        $("#sufrom").html(n.u_from == 0 ? "自主注册" : "管理员添加");
        $("#suregistTime").html((new Date(parseFloat(n.u_registTime.replace("/Date(", "").replace(")/", "")))).Format("yyyy-MM-dd"));
        $("#sunumber").html(n.u_number);
        $("#suenName").html(n.u_enName);
        $("#sujwclass").html(jwclass["x" + n.u_jwclass]);
        $("#supapers").html(n.u_papers);
        $("#subirthday").html((new Date(parseFloat(n.u_birthday.replace("/Date(", "").replace(")/", "")))).Format("yyyy-MM-dd"));
        $("#suage").html(n.u_age);
        $("#susex").html(n.u_sex == 0 ? "男" : "女");
        $("#suschool").html(n.u_school);
        $("#suclass").html(n.u_class);
        $("#suenglish").html(n.u_english);
        $("#supatriarchName1").html(n.u_patriarchName1);
        $("#suraletion1").html(n.u_raletion1);
        $("#sutel1").html(n.u_tel1);
        $("#supatriarchAge1").html(n.u_patriarchAge1);
        $("#supatriarchEducation1").html(n.u_patriarchEducation1);
        $("#sujob1").html(n.u_job1);
        $("#supost1").html(n.u_post1);
        $("#supatriarchName2").html(n.u_patriarchName2);
        $("#suraletion2").html(n.u_raletion2);
        $("#sutel2").html(n.u_tel2);
        $("#supatriarchAge2").html(n.u_patriarchAge2);
        $("#supatriarchEducation2").html(n.u_patriarchEducation2);
        $("#sujob2").html(n.u_job2);
        $("#supost2").html(n.u_post2);
        $("#suaddress").html(n.u_address);
        $("#suemail").html(n.u_email);
        $("#sustate").html(ustate["x" + n.u_state]);
        $("#sutime").html((new Date(parseFloat(n.u_time.replace("/Date(", "").replace(")/", "")))).Format("yyyy-MM-dd"));
        $("#suteacher1").html(n.u_teacher1);
        $("#suteacher2").html(n.u_teacher2);
        $("#sustudyTime1").html(n.u_studyTime1);
        $("#sustudyTime2 ").html(n.u_studyTime2);
        $("#resetPwd").attr("uid", n.u_id);
        $("input[name=btnSetCard]").attr("uid", n.u_id);
        $("input[name=btnSetCard]").attr("domid", "cz");
        $("input[name=btnSetCard]").attr("uname", n.u_name);
        $("input[name=uc_card]").attr("domid", "cz");
    }
</script>
    <div id="OpenWindow">
        <div id="signup-ct">
            <div id="OpenWindow-header">
                <h2 id="sutitle">我是标题</h2>
                <a href="#" class="modal_close"></a>
            </div>
            <div style="overflow-y:scroll;height:300px;">
            <div class="txt-fld">
            <label>密码重置：</label><span><input type="button" id="resetPwd" value="重置" /> 重置后密码为123456</span>
            </div> 
            <div class="txt-fld">
            <label>会员状态修改：</label>
            <select id="updateuvip">
                    <option value="-1">请选择</option>
                   <%
                        foreach (string s in Enum.GetNames(typeof(DAL.Enums.uservip)))
                        {
                            int _v = (int)Enum.Parse(typeof(DAL.Enums.uservip), s);
                            Response.Write("<option value='" + _v + "'>" + s + "</option>");
                        }
                    %>
                    </select><input type="button" id="btnUpdateUvip" value="修改" /> 
            </div>
            <div class="txt-fld" id = "cz">
            <table style="width:100%;border:1px;border-color:White;text-align:left;" cellpadding="0" cellspacing="0">
            <tr><td style="border:1px;border-color:White;">卡号：<input type="text" class="uc_card" name="uc_card" onblur="_cardinfo($(this).val(),$(this).attr('domid'))" /><%--类型：<select name="uc_chargeMode">
            <option value="-1">-请选择-</option>
             <%
                 foreach (string s in Enum.GetNames(typeof(DAL.Enums.cardType)))
                 {
                     int _v = (int)Enum.Parse(typeof(DAL.Enums.cardType), s);
                     Response.Write("<option value='" + _v + "'>" + s + "</option>");
                     Response.Write("<script>cardType['x" + _v + "']='" + s + "';</script>");
                 }
             %>
            </select>--%></td></tr>
            <tr><td style="border:1px;border-color:White;">卡费：<input type="text" name="uc_kf" /></td></tr>
            <tr><td style="border:1px;border-color:White;">押金：<input type="text" name="uc_yj" /></td></tr>
            <tr><td style="border:1px;border-color:White;">备注：<input type="text" name="uc_bz" /><input type="button" onclick="_cz($(this).attr('uid'),$(this).attr('domid'))" name="btnSetCard" value="充值" /></td></tr>
            </table>
            </div>
            <div class="txt-fld">
                <label>中文名：</label><span id="suname"></span>
                <label>登录名：</label><span id="sunick"></span>
                <label>会员状态：</label><span id="suvip"></span>
            </div>
            <div class="txt-fld">
                <label>用户来源：</label><span id="sufrom"></span>
                <label>注册时间：</label><span id="suregistTime"></span>
            </div>
            <div class="txt-fld">
                <label>学籍编号：</label><span id="sunumber"></span>
                <label>英文名：</label><span id="suenName"></span>
            </div>            
            <div class="txt-fld">
                <label>嘉沃班级：</label><span id="sujwclass"></span>
                <label>有效证件号码：</label><span id="supapers"></span>
            </div>            
            <div class="txt-fld">
                <label>出生日期：</label><span id="subirthday"></span>
                <label>年龄：</label><span id="suage"></span>
            </div>
            <div class="txt-fld">
                <label>性别：</label><span id="susex"></span>
                <label>在读学校：</label><span id="suschool"></span>
            </div>            
            <div class="txt-fld">
                <label>在读班级：</label><span id="suclass"></span>
                <label>入学前英语基础：</label><span id="suenglish"></span>
            </div>            
            <div class="txt-fld">
                <label>家长1姓名：</label><span id="supatriarchName1"></span>
                <label>家长1与学员关系：</label><span id="suraletion1"></span>
            </div> 
            <div class="txt-fld">
                <label>联系电话1：</label><span id="sutel1"></span>
                <label>家长1年龄：</label><span id="supatriarchAge1"></span>
            </div> 
            <div class="txt-fld">
                <label>家长1学历：</label><span id="supatriarchEducation1"></span>
                <label>家长1从事行业：</label><span id="sujob1"></span>
            </div> 
            <div class="txt-fld">
                <label>家长1职位：</label><span id="supost1"></span>
                <label>家长2姓名：</label><span id="supatriarchName2"></span>
            </div> 
            <div class="txt-fld">
                <label>家长2与学员关系：</label><span id="suraletion2"></span>
                <label>联系电话2：</label><span id="sutel2"></span>
            </div> 
            <div class="txt-fld">
                <label>家长2年龄：</label><span id="supatriarchAge2"></span>
                <label>家长2学历：</label><span id="supatriarchEducation2"></span>
            </div> 
            <div class="txt-fld">
                <label>家长2从事行业：</label><span id="sujob2"></span>
                <label>家长2职位：</label><span id="supost2"></span>
            </div> 
            <div class="txt-fld">
                <label>住址：</label><span id="suaddress"></span>
            </div> 
            <div class="txt-fld">
                <label>邮箱地址：</label><span id="suemail"></span>
            </div> 
            <div class="txt-fld">
                <label>学员状态：</label><span id="sustate"></span>
                <label>入学时间：</label><span id="sutime"></span>
            </div> 
            <div class="txt-fld">
                <label>带班老师1：</label><span id="suteacher1"></span>
                <label>带班老师2：</label><span id="suteacher2"></span>
            </div> 
            <div class="txt-fld">
                <label>上课时间1：</label><span id="sustudyTime1"></span>
                <label>上课时间2：</label><span id="sustudyTime2"></span>
            </div> 
            <div style="height:20px;"></div>
            </div>
        </div>
    </div>
    <table cellspacing="0" id="seekForm" >
        <tr>
            <th>
                会员管理
            </th>
        </tr>
        <tr>
        <td>
            卡号：<input type="text" name="ucard" />
            中文名：<input type="text" name="uname" />
            登录名：<input type="text" name="unick" />
            学籍编号：<input type="text" name="unumber" />
            <% 
                BIZ.UserClassOper uco = new BIZ.UserClassOper();
                IList li = uco.getClassList();
            %>
            <p/>
            嘉沃班级：<select name="ujwclass">
                    <option value="-1">请选择</option>
                    <%
                        foreach (Hashtable tb in li)
                        {
                            Response.Write("<option value='" + tb["uic_id"] + "'>" + tb["ct"] + "</option>");
                            Response.Write("<script>jwclass['x" + tb["uic_id"] + "']='" + tb["uic_class"] + "';</script>");
                        }
                    %>
                    </select>
            会员状态:<select name="uvip">
                    <option value="-1">请选择</option>
                   <%
                        foreach (string s in Enum.GetNames(typeof(DAL.Enums.uservip)))
                        {
                            int _v = (int)Enum.Parse(typeof(DAL.Enums.uservip), s);
                            Response.Write("<option value='" + _v + "'>" + s + "</option>");
                        }
                    %>
                    </select>
            学员状态:<select name="ustate">
            <option value="-1">请选择</option>
                    <%
                        foreach (string s in Enum.GetNames(typeof(DAL.Enums.userState)))
                        {
                            int _v = (int)Enum.Parse(typeof(DAL.Enums.userState), s);
                            Response.Write("<option value='" + _v + "'>" + s + "</option>");
                        }
                    %>
            </select>
            <p/>
            带班老师：<input type="text" name="uteacher1" />

            <p/>
                            入学时间：<input type="text" size="15" name="uregistTime_s" class="date" />
                至<input type="text" size="15" name="uregistTime_e" class="date" />
                <script type="text/javascript">
                    $(document).ready(function () {
                        $(function () {
                            $(':text[name=uregistTime_s]').datepicker({
                                numberOfMonths: 1,
                                showButtonPanel: true,
                                changeMonth: true,
                                yearRange: '-40:+1', changeYear: true
                            });
                            $(':text[name=uregistTime_e]').datepicker({
                                numberOfMonths: 1,
                                showButtonPanel: true,
                                changeMonth: true,
                                yearRange: '-40:+1', changeYear: true
                            });
                        });
                    });
                </script>
            <p/>
            排序：<input type="checkbox" name="orderName" />中文名<input type="checkbox" name="orderEname" />英文名<input type="checkbox" name="orderNumber" />学籍编号<input type="checkbox" name="orderBrithday" />出生日期<input type="checkbox" name="orderVip" />会员状态<input type="checkbox" name="orderJwclass" />嘉沃班级<input type="checkbox" name="orderId" checked />添加时间
            <input type="button" name="buttSeek" value="查询" class="btn1" />
        </td>
        </tr>
    </table>
    <table id="mainTable" cellspacing="0">
        <caption style="color: red; font-size: 15px; font-weight: bold">会员列表</caption>
        <tr>
            <th>
                中文名
            </th>
            <th>
                英文名
            </th>
            <th>
                学籍编号
            </th>
            <th>性别</th>
            <th>出生日期</th>
            <th>会员状态</th>
                        <th>
                嘉沃班级
            </th>
                        <th>
                联系电话1
            </th>
            <th>
            
            </th>
            </tr>
        <tbody name="mainlist">
        
        </tbody>
    </table>
    <div id="pager" class="pager">
    </div>
    <table cellspacing="0" id="mainForm">
        <tr>
            <th colspan="3">
                编辑会员信息
            </th>
        </tr>
         <tr>
            <td>登录名*</td>
            <td><input id="u_nick" name="u_nick" maxlength="20" />初始密码：123456</td>
            <td><span class="tsxx"></span></td>
        </tr>
        <tr>
            <td>学籍编号*</td>
            <td><input id="u_number" name="u_number" maxlength="40"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>中文名*</td>
            <td><input id="u_name" name="u_name" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>英文名</td>
            <td><input id="u_enName" name="u_enName" maxlength="20"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>嘉沃班级*</td>
            <td>
                    <select name="u_jwclass">
                    <option value="-1">请选择</option>
                    <%
                        foreach (Hashtable tb in li)
                        {
                            Response.Write("<option value='" + tb["uic_id"] + "'>" + tb["ct"] + "</option>");
                        }
                    %>
                </select>
            </td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>会员状态*</td>
            <td>
                    <select name="u_vip">
                    <option value="-1">请选择</option>
                    <%
                        foreach (string s in Enum.GetNames(typeof(DAL.Enums.uservip)))
                        {
                            int _v = (int)Enum.Parse(typeof(DAL.Enums.uservip), s);
                            if (_v!=2)
                            Response.Write("<option value='" + _v + "'>" + s + "</option>");
                            Response.Write("<script>uvip['x" + _v + "']='" + s + "';</script>");
                        }
                    %>
                </select>
            </td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>有效证件号码</td>
            <td><input id="u_papers" name="u_papers" maxlength="20"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
             
                             <tr>
            <td>出生日期*</td>
            <td><input type="text"  size="15" id="u_birthday" name="u_birthday"  value="<%=System.DateTime.Now.ToString("yyyy-MM-dd") %>" class="date" /></td>
                            <script type="text/javascript">
                                    $(function () {
                                        $(':text[name=u_birthday]').datepicker({
                                            numberOfMonths: 1,
                                            showButtonPanel: true,
                                            changeMonth: true,
                                            yearRange: '-40:+1',changeYear: true
                                        });
                                    });
                            </script>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>性别*</td>
            <td><select name="u_sex">
                <option value="0" selected>男</option>
                 <option value="1">女</option>
                </select></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>在读学校</td>
            <td><input id="u_school" name="u_school" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
        <tr>
            <td>在读班级</td>
            <td><input id="u_class" name="u_class" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>入学前英语基础</td>
            <td><input id="u_english" name="u_english" maxlength="100"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>家长1姓名</td>
            <td><input id="u_patriarchName1" name="u_patriarchName1" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>家长1与学员关系</td>
            <td><input id="u_raletion1" name="u_raletion1" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>联系电话1*</td>
            <td><input id="u_tel1" name="u_tel1" maxlength="20"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长1年龄</td>
            <td><input id="u_patriarchAge1" name="u_patriarchAge1" maxlength="3"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长1学历</td>
            <td><input id="u_patriarchEducation1" name="u_patriarchEducation1" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长1从事行业</td>
            <td><input id="u_job1" name="u_job1" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长1职位</td>
            <td><input id="u_post1" name="u_post1" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长2姓名</td>
            <td><input id="u_patriarchName2" name="u_patriarchName2" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                <tr>
            <td>家长2与学员关系</td>
            <td><input id="u_raletion2" name="u_raletion2" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>联系电话2*</td>
            <td><input id="u_tel2" name="u_tel2" maxlength="20"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长2年龄</td>
            <td><input id="u_patriarchAge2" name="u_patriarchAge2" maxlength="3"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长2学历</td>
            <td><input id="u_patriarchEducation2" name="u_patriarchEducation2" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长2从事行业</td>
            <td><input id="u_job2" name="u_job2" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                        <tr>
            <td>家长2职位</td>
            <td><input id="u_post2" name="u_post2" maxlength="10"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                <tr>
            <td>住址*</td>
            <td><input id="u_address" name="u_address" maxlength="100"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                <tr>
            <td>邮箱地址</td>
            <td><input id="u_email" name="u_email" maxlength="50"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                <tr>
            <td>学员状态</td>
            <td><select name="u_state">
                    <%
                        foreach (string s in Enum.GetNames(typeof(DAL.Enums.userState)))
                        {
                            int _v = (int)Enum.Parse(typeof(DAL.Enums.userState), s);
                            Response.Write("<option value='" + _v + "'>" + s + "</option>");
                            Response.Write("<script>ustate['x" + _v + "']='" + s + "';</script>");
                        }
                    %>
                </select></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                     <tr>
            <td>入学时间</td>
            <td><input type="text"  size="15" id="u_time" name="u_time"  value="<%=System.DateTime.Now.ToString("yyyy-MM-dd") %>" class="date" /></td>
                                        <script type="text/javascript">
                                            $(function () {
                                                $(':text[name=u_time]').datepicker({
                                                    numberOfMonths: 1,
                                                    showButtonPanel: true,
                                                    changeMonth: true,
                                                    yearRange: '-40:+1',changeYear: true
                                                });
                                            });
                            </script>
            <td><span class="tsxx"></span></td>
        </tr>
                                        <tr>
            <td>带班老师1</td>
            <td><input id="u_teacher1" name="u_teacher1" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                        <tr>
            <td>带班老师2</td>
            <td><input id="u_teacher2" name="u_teacher2" maxlength="25"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                        <tr>
            <td>上课时间1</td>
            <td><input id="u_studyTime1" name="u_studyTime1" maxlength="50"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
                                        <tr>
            <td>上课时间2</td>
            <td><input id="u_studyTime2" name="u_studyTime2" maxlength="50"  /></td>
            <td><span class="tsxx"></span></td>
        </tr>
     
        <tr class="main-status" id="mainstatus" style="display: none">
            <td colspan="3" class="bbd-bj-bom" align="center" height="41">
                正在验证表单....
            </td>
        </tr>
        <tr class="main-sub" id="mainsub">
            <td colspan="3" class="bbd-bj-bom" align="center" height="41">
                <input type="button" name="buttsend" id="buttsend" class="btn1" style="width: 200px" 
                    value="保存" />
                <input type="button" id="btnreset" class="btn1" style="width: 200px" value="重置" />
            </td>
        </tr>
    </table>
</asp:Content>
